import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 晓星航
 * Date: 2023-10-08
 * Time: 9:44
 */
public class TriangularMatrix_1 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in) ;
        int s = sc.nextInt();
        int n = sc.nextInt();
        int l = sc.nextInt();
        TriangularMatrix_1 Triangle = null;
        Triangle.Print(s, n, l);
    }
    //定义方法
    //s为开始的数，n为最大的数，l为三角行直角边的长度。
    public static void Print(int s ,int n ,int l ) {
        int[][] num = new int[l][l];
        for (int i = 0; i < l; i++) {
            for (int j = 0; j < l - i; j++) {
                num[j][i] = s;
                s++;
                if (s > n) {
                    s = 1;
                }
            }
        }
        for (int[] a : num) {
            for (int k : a) {
                System.out.print(k == 0 ? " " : k + "\t");//把二维数组中的0改为空格
            }
            System.out.println();
        }
    }
}
